import { theme } from "../../common/theme.js";

export const css = `
.interaction-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.interaction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
    border-radius: 20px;
    position: relative;
    user-select: none;
}

.interaction-item:hover {
    transform: scale(1.05);
}

.interaction-item:active {
    transform: scale(0.95);
}

.icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon {
    font-size: 24px;
    transition: all 0.3s ease;
    color: #ffffff;
}

/* 图标默认颜色 */
.like-icon {
    color: #ffffff;
}

.comment-icon {
    color: #ffffff;
}

.collect-icon {
    color: #ffffff;
}

.share-icon {
    color: #ffffff;
}

/* 激活状态的图标颜色 */
.like-item.active .like-icon {
    color: #ff4757;
}

.collect-item.active .collect-icon {
    color: #ffd700;
}

.count {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 20px;
    text-align: center;
}

/* 点赞按钮样式 */

/* 评论按钮样式 */

/* 收藏按钮样式 */

/* 分享按钮样式 */

/* 动画效果 */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.3);
    }
    30% {
        transform: scale(1.1);
    }
    45% {
        transform: scale(1.25);
    }
    60% {
        transform: scale(1.05);
    }
    75% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes collectAnimation {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    75% {
        transform: scale(1.15) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

.animate-like {
    animation: likeAnimation 0.6s ease-in-out;
}

.animate-collect {
    animation: collectAnimation 0.6s ease-in-out;
}

/* 涟漪效果 */

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .interaction-bar {
        right: 10px;
        bottom: 10px;
        gap: 10px;
        padding: 15px 0;
    }

    .interaction-item {
        padding: 10px;
        gap: 3px;
    }
    
    .icon-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .icon {
        font-size: 20px;
    }
    
    .count {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .interaction-bar {
        right: 8px;
        bottom: 8px;
        gap: 8px;
        padding: 12px 0;
    }

    .interaction-item {
        padding: 8px;
        gap: 2px;
    }
    
    .icon-wrapper {
        width: 38px;
        height: 38px;
    }
    
    .icon {
        font-size: 18px;
    }
    
    .count {
        font-size: 10px;
    }
}

/* 横屏模式适配 */
@media (orientation: landscape) and (max-height: 500px) {
    .interaction-bar {
        flex-direction: row;
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: none;
        padding: 0 20px;
        gap: 10px;
    }

    .interaction-item {
        flex-direction: row;
        gap: 4px;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    /* 暗色主题样式 */
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .count {
        text-shadow: 0 0 4px rgba(0, 0, 0, 1);
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .interaction-item,
    .icon-wrapper,
    .icon {
        transition: none;
    }

    .animate-like,
    .animate-collect {
        animation: none;
    }
}
`;